/*
 * @Author: wxinlong 3075748076@qq.com
 * @Date: 2023-06-17 10:28:31
 * @LastEditors: wxinlong 3075748076@qq.com
 * @LastEditTime: 2023-06-17 10:55:28
 * @Description: 标签模型
 * Copyright (c) 2023 by wxinlong 3075748076@qq.com, All Rights Reserved.
 */
const { DataTypes, Model } = require('sequelize')
const sequelize = require('../config/database')
class Tag extends Model {}

Tag.init(
  {
    name: {
      comment: '标签名称',
      type: DataTypes.STRING,
      allowNull: false,
      unique: true
    },
    isDeleted: {
      comment: '是否已经删除',
      type: DataTypes.BOOLEAN,
      allowNull: false,
      defaultValue: false
    }
  },
  {
    sequelize,
    modelName: 'Tag'
  }
)

module.exports = Tag
